");return c.inlineElement=f,f}return b.updateStatus("ready"),b._parseMarkup(d,{},c),d}}});var H,I="ajax",J=function(){H&&a(document.body).removeClass(H)},K=function(){J(),b.req&&b.req.abort()};a.magnificPopup.registerModule(I,{options:{settings:null,cursor:"mfp-ajax-cur",tError:'
The content could not be loaded.'},proto:{initAjax:function(){b.types.push(I),H=b.st.ajax.cursor,w(h+"."+I,K),w("BeforeChange."+I,K)},getAjax:function(c){H&&a(document.body).addClass(H),b.updateStatus("loading");var d=a.extend({url:c.src,success:function(d,e,f){var g={data:d,xhr:f};y("ParseAjax",g),b.appendContent(a(g.data),I),c.finished=!0,J(),b._setFocus(),setTimeout(function(){b.wrap.addClass(q)},16),b.updateStatus("ready"),y("AjaxContentAdded")},error:function(){J(),c.finished=c.loadError=!0,b.updateStatus("error",b.st.ajax.tError.replace("%url%",c.src))}},b.st.ajax.settings);return b.req=a.ajax(d),""}}});var L,M=function(c){if(c.data&&void 0!==c.data.title)return c.data.title;var d=b.st.image.titleSrc;if(d){if(a.isFunction(d))return d.call(b,c);if(c.el)return c.el.attr(d)||""}return""};a.magnificPopup.registerModule("image",{options:{markup:'
',cursor:"mfp-zoom-out-cur",titleSrc:"title",verticalFit:!0,tError:'
The image could not be loaded.'},proto:{initImage:function(){var c=b.st.image,d=".image";b.types.push("image"),w(m+d,function(){"image"===b.currItem.type&&c.cursor&&a(document.body).addClass(c.cursor)}),w(h+d,function(){c.cursor&&a(document.body).removeClass(c.cursor),v.off("resize"+p)}),w("Resize"+d,b.resizeImage),b.isLowIE&&w("AfterChange",b.resizeImage)},resizeImage:function(){var a=b.currItem;if(a&&a.img&&b.st.image.verticalFit){var c=0;b.isLowIE&&(c=parseInt(a.img.css("padding-top"),10)+parseInt(a.img.css("padding-bottom"),10)),a.img.css("max-height",b.wH-c)}},_onImageHasSize:function(a){a.img&&(a.hasSize=!0,L&&clearInterval(L),a.isCheckingImgSize=!1,y("ImageHasSize",a),a.imgHidden&&(b.content&&b.content.removeClass("mfp-loading"),a.imgHidden=!1))},findImageSize:function(a){var c=0,d=a.img[0],e=function(f){L&&clearInterval(L),L=setInterval(function(){return d.naturalWidth>0?void b._onImageHasSize(a):(c>200&&clearInterval(L),c++,void(3===c?e(10):40===c?e(50):100===c&&e(500)))},f)};e(1)},getImage:function(c,d){var e=0,f=function(){c&&(c.img[0].complete?(c.img.off(".mfploader"),c===b.currItem&&(b._onImageHasSize(c),b.updateStatus("ready")),c.hasSize=!0,c.loaded=!0,y("ImageLoadComplete")):(e++,200>e?setTimeout(f,100):g()))},g=function(){c&&(c.img.off(".mfploader"),c===b.currItem&&(b._onImageHasSize(c),b.updateStatus("error",h.tError.replace("%url%",c.src))),c.hasSize=!0,c.loaded=!0,c.loadError=!0)},h=b.st.image,i=d.find(".mfp-img");if(i.length){var j=document.createElement("img");j.className="mfp-img",c.el&&c.el.find("img").length&&(j.alt=c.el.find("img").attr("alt")),c.img=a(j).on("load.mfploader",f).on("error.mfploader",g),j.src=c.src,i.is("img")&&(c.img=c.img.clone()),j=c.img[0],j.naturalWidth>0?c.hasSize=!0:j.width||(c.hasSize=!1)}return b._parseMarkup(d,{title:M(c),img_replaceWith:c.img},c),b.resizeImage(),c.hasSize?(L&&clearInterval(L),c.loadError?(d.addClass("mfp-loading"),b.updateStatus("error",h.tError.replace("%url%",c.src))):(d.removeClass("mfp-loading"),b.updateStatus("ready")),d):(b.updateStatus("loading"),c.loading=!0,c.hasSize||(c.imgHidden=!0,d.addClass("mfp-loading"),b.findImageSize(c)),d)}}});var N,O=function(){return void 0===N&&(N=void 0!==document.createElement("p").style.MozTransform),N};a.magnificPopup.registerModule("zoom",{options:{enabled:!1,easing:"ease-in-out",duration:300,opener:function(a){return a.is("img")?a:a.find("img")}},proto:{initZoom:function(){var a,c=b.st.zoom,d=".zoom";if(c.enabled&&b.supportsTransition){var e,f,g=c.duration,j=function(a){var b=a.clone().removeAttr("style").removeAttr("class").addClass("mfp-animated-image"),d="all "+c.duration/1e3+"s "+c.easing,e={position:"fixed",zIndex:9999,left:0,top:0,"-webkit-backface-visibility":"hidden"},f="transition";return e["-webkit-"+f]=e["-moz-"+f]=e["-o-"+f]=e[f]=d,b.css(e),b},k=function(){b.content.css("visibility","visible")};w("BuildControls"+d,function(){if(b._allowZoom()){if(clearTimeout(e),b.content.css("visibility","hidden"),a=b._getItemToZoom(),!a)return void k();f=j(a),f.css(b._getOffset()),b.wrap.append(f),e=setTimeout(function(){f.css(b._getOffset(!0)),e=setTimeout(function(){k(),setTimeout(function(){f.remove(),a=f=null,y("ZoomAnimationEnded")},16)},g)},16)}}),w(i+d,function(){if(b._allowZoom()){if(clearTimeout(e),b.st.removalDelay=g,!a){if(a=b._getItemToZoom(),!a)return;f=j(a)}f.css(b._getOffset(!0)),b.wrap.append(f),b.content.css("visibility","hidden"),setTimeout(function(){f.css(b._getOffset())},16)}}),w(h+d,function(){b._allowZoom()&&(k(),f&&f.remove(),a=null)})}},_allowZoom:function(){return"image"===b.currItem.type},_getItemToZoom:function(){return b.currItem.hasSize?b.currItem.img:!1},_getOffset:function(c){var d;d=c?b.currItem.img:b.st.zoom.opener(b.currItem.el||b.currItem);var e=d.offset(),f=parseInt(d.css("padding-top"),10),g=parseInt(d.css("padding-bottom"),10);e.top-=a(window).scrollTop()-f;var h={width:d.width(),height:(u?d.innerHeight():d[0].offsetHeight)-g-f};return O()?h["-moz-transform"]=h.transform="translate("+e.left+"px,"+e.top+"px)":(h.left=e.left,h.top=e.top),h}}});var P="iframe",Q="//about:blank",R=function(a){if(b.currTemplate[P]){var c=b.currTemplate[P].find("iframe");c.length&&(a||(c[0].src=Q),b.isIE8&&c.css("display",a?"block":"none"))}};a.magnificPopup.registerModule(P,{options:{markup:'
',srcAction:"iframe_src",patterns:{youtube:{index:"youtube.com",id:"v=",src:"//www.youtube.com/embed/%id%?autoplay=1"},vimeo:{index:"vimeo.com/",id:"/",src:"//player.vimeo.com/video/%id%?autoplay=1"},gmaps:{index:"//maps.google.",src:"%id%&output=embed"}}},proto:{initIframe:function(){b.types.push(P),w("BeforeChange",function(a,b,c){b!==c&&(b===P?R():c===P&&R(!0))}),w(h+"."+P,function(){R()})},getIframe:function(c,d){var e=c.src,f=b.st.iframe;a.each(f.patterns,function(){return e.indexOf(this.index)>-1?(this.id&&(e="string"==typeof this.id?e.substr(e.lastIndexOf(this.id)+this.id.length,e.length):this.id.call(this,e)),e=this.src.replace("%id%",e),!1):void 0});var g={};return f.srcAction&&(g[f.srcAction]=e),b._parseMarkup(d,g,c),b.updateStatus("ready"),d}}});var S=function(a){var c=b.items.length;return a>c-1?a-c:0>a?c+a:a},T=function(a,b,c){return a.replace(/%curr%/gi,b+1).replace(/%total%/gi,c)};a.magnificPopup.registerModule("gallery",{options:{enabled:!1,arrowMarkup:'
',preload:[0,2],navigateByImgClick:!0,arrows:!0,tPrev:"Previous (Left arrow key)",tNext:"Next (Right arrow key)",tCounter:"%curr%/%total%"},proto:{initGallery:function(){var c=b.st.gallery,e=".mfp-gallery";return b.direction=!0,c&&c.enabled?(f+=" mfp-gallery",w(m+e,function(){c.navigateByImgClick&&b.wrap.on("click"+e,".mfp-img",function(){return b.items.length>1?(b.next(),!1):void 0}),d.on("keydown"+e,function(a){37===a.keyCode?b.prev():39===a.keyCode&&b.next()})}),w("UpdateStatus"+e,function(a,c){c.text&&(c.text=T(c.text,b.currItem.index,b.items.length))}),w(l+e,function(a,d,e,f){var g=b.items.length;e.counter=g>1?T(c.tCounter,f.index,g):""}),w("BuildControls"+e,function(){if(b.items.length>1&&c.arrows&&!b.arrowLeft){var d=c.arrowMarkup,e=b.arrowLeft=a(d.replace(/%title%/gi,c.tPrev).replace(/%dir%/gi,"left")).addClass(s),f=b.arrowRight=a(d.replace(/%title%/gi,c.tNext).replace(/%dir%/gi,"right")).addClass(s);e.click(function(){b.prev()}),f.click(function(){b.next()}),b.container.append(e.add(f))}}),w(n+e,function(){b._preloadTimeout&&clearTimeout(b._preloadTimeout),b._preloadTimeout=setTimeout(function(){b.preloadNearbyImages(),b._preloadTimeout=null},16)}),void w(h+e,function(){d.off(e),b.wrap.off("click"+e),b.arrowRight=b.arrowLeft=null})):!1},next:function(){b.direction=!0,b.index=S(b.index+1),b.updateItemHTML()},prev:function(){b.direction=!1,b.index=S(b.index-1),b.updateItemHTML()},goTo:function(a){b.direction=a>=b.index,b.index=a,b.updateItemHTML()},preloadNearbyImages:function(){var a,c=b.st.gallery.preload,d=Math.min(c[0],b.items.length),e=Math.min(c[1],b.items.length);for(a=1;a<=(b.direction?e:d);a++)b._preloadItem(b.index+a);for(a=1;a<=(b.direction?d:e);a++)b._preloadItem(b.index-a)},_preloadItem:function(c){if(c=S(c),!b.items[c].preloaded){var d=b.items[c];d.parsed||(d=b.parseEl(c)),y("LazyLoad",d),"image"===d.type&&(d.img=a('
').on("load.mfploader",function(){d.hasSize=!0}).on("error.mfploader",function(){d.hasSize=!0,d.loadError=!0,y("LazyLoadError",d)}).attr("src",d.src)),d.preloaded=!0}}}});var U="retina";a.magnificPopup.registerModule(U,{options:{replaceSrc:function(a){return a.src.replace(/\.\w+$/,function(a){return"@2x"+a})},ratio:1},proto:{initRetina:function(){if(window.devicePixelRatio>1){var a=b.st.retina,c=a.ratio;c=isNaN(c)?c():c,c>1&&(w("ImageHasSize."+U,function(a,b){b.img.css({"max-width":b.img[0].naturalWidth/c,width:"100%"})}),w("ElementParse."+U,function(b,d){d.src=a.replaceSrc(d,c)}))}}}}),A()});
(function(window, factory){
if(typeof define=='function'&&define.amd){
define('jquery-bridget/jquery-bridget',[ 'jquery' ], function(jQuery){
return factory(window, jQuery);
});
}else if(typeof module=='object'&&module.exports){
module.exports=factory(
window,
require('jquery')
);
}else{
window.jQueryBridget=factory(
window,
window.jQuery
);
}}(window, function factory(window, jQuery){
'use strict';
var arraySlice=Array.prototype.slice;
var console=window.console;
var logError=typeof console=='undefined' ? function(){} :
function(message){
console.error(message);
};
function jQueryBridget(namespace, PluginClass, $){
$=$||jQuery||window.jQuery;
if(!$){
return;
}
if(!PluginClass.prototype.option){
PluginClass.prototype.option=function(opts){
if(!$.isPlainObject(opts)){
return;
}
this.options=$.extend(true, this.options, opts);
};}
$.fn[ namespace ]=function(arg0 ){
if(typeof arg0=='string'){
var args=arraySlice.call(arguments, 1);
return methodCall(this, arg0, args);
}
plainCall(this, arg0);
return this;
};
function methodCall($elems, methodName, args){
var returnValue;
var pluginMethodStr='$().' + namespace + '("' + methodName + '")';
$elems.each(function(i, elem){
var instance=$.data(elem, namespace);
if(!instance){
logError(namespace + ' not initialized. Cannot call methods, i.e. ' +
pluginMethodStr);
return;
}
var method=instance[ methodName ];
if(!method||methodName.charAt(0)=='_'){
logError(pluginMethodStr + ' is not a valid method');
return;
}
var value=method.apply(instance, args);
returnValue=returnValue===undefined ? value:returnValue;
});
return returnValue!==undefined ? returnValue:$elems;
}
function plainCall($elems, options){
$elems.each(function(i, elem){
var instance=$.data(elem, namespace);
if(instance){
instance.option(options);
instance._init();
}else{
instance=new PluginClass(elem, options);
$.data(elem, namespace, instance);
}});
}
updateJQuery($);
}
function updateJQuery($){
if(!$||($&&$.bridget)){
return;
}
$.bridget=jQueryBridget;
}
updateJQuery(jQuery||window.jQuery);
return jQueryBridget;
}));
(function(global, factory){
if(typeof define=='function'&&define.amd){
define('ev-emitter/ev-emitter',factory);
}else if(typeof module=='object'&&module.exports){
module.exports=factory();
}else{
global.EvEmitter=factory();
}}(typeof window!='undefined' ? window:this, function(){
function EvEmitter(){}
var proto=EvEmitter.prototype;
proto.on=function(eventName, listener){
if(!eventName||!listener){
return;
}
var events=this._events=this._events||{};
var listeners=events[ eventName ]=events[ eventName ]||[];
if(listeners.indexOf(listener)==-1){
listeners.push(listener);
}
return this;
};
proto.once=function(eventName, listener){
if(!eventName||!listener){
return;
}
this.on(eventName, listener);
var onceEvents=this._onceEvents=this._onceEvents||{};
var onceListeners=onceEvents[ eventName ]=onceEvents[ eventName ]||{};
onceListeners[ listener ]=true;
return this;
};
proto.off=function(eventName, listener){
var listeners=this._events&&this._events[ eventName ];
if(!listeners||!listeners.length){
return;
}
var index=listeners.indexOf(listener);
if(index!=-1){
listeners.splice(index, 1);
}
return this;
};
proto.emitEvent=function(eventName, args){
var listeners=this._events&&this._events[ eventName ];
if(!listeners||!listeners.length){
return;
}
var i=0;
var listener=listeners[i];
args=args||[];
var onceListeners=this._onceEvents&&this._onceEvents[ eventName ];
while(listener){
var isOnce=onceListeners&&onceListeners[ listener ];
if(isOnce){
this.off(eventName, listener);
delete onceListeners[ listener ];
}
listener.apply(this, args);
i +=isOnce ? 0:1;
listener=listeners[i];
}
return this;
};
return EvEmitter;
}));
(function(window, factory){
'use strict';
if(typeof define=='function'&&define.amd){
define('get-size/get-size',[],function(){
return factory();
});
}else if(typeof module=='object'&&module.exports){
module.exports=factory();
}else{
window.getSize=factory();
}})(window, function factory(){
'use strict';
function getStyleSize(value){
var num=parseFloat(value);
var isValid=value.indexOf('%')==-1&&!isNaN(num);
return isValid&#
}
function noop(){}
var logError=typeof console=='undefined' ? noop :
function(message){
console.error(message);
};
var measurements=[
'paddingLeft',
'paddingRight',
'paddingTop',
'paddingBottom',
'marginLeft',
'marginRight',
'marginTop',
'marginBottom',
'borderLeftWidth',
'borderRightWidth',
'borderTopWidth',
'borderBottomWidth'
];
var measurementsLength=measurements.length;
function getZeroSize(){
var size={
width: 0,
height: 0,
innerWidth: 0,
innerHeight: 0,
outerWidth: 0,
outerHeight: 0
};
for(var i=0; i < measurementsLength; i++){
var measurement=measurements[i];
size[ measurement ]=0;
}
return size;
}
function getStyle(elem){
var style=getComputedStyle(elem);
if(!style){
logError('Style returned ' + style +
'. Are you running this code in a hidden iframe on Firefox? ' +
'See http://bit.ly/getsizebug1');
}
return style;
}
var isSetup=false;
var isBoxSizeOuter;
function setup(){
if(isSetup){
return;
}
isSetup=true;
var div=document.createElement('div');
div.style.width='200px';
div.style.padding='1px 2px 3px 4px';
div.style.borderStyle='solid';
div.style.borderWidth='1px 2px 3px 4px';
div.style.boxSizing='border-box';
var body=document.body||document.documentElement;
body.appendChild(div);
var style=getStyle(div);
getSize.isBoxSizeOuter=isBoxSizeOuter=getStyleSize(style.width)==200;
body.removeChild(div);
}
function getSize(elem){
setup();
if(typeof elem=='string'){
elem=document.querySelector(elem);
}
if(!elem||typeof elem!='object'||!elem.nodeType){
return;
}
var style=getStyle(elem);
if(style.display=='none'){
return getZeroSize();
}
var size={};
size.width=elem.offsetWidth;
size.height=elem.offsetHeight;
var isBorderBox=size.isBorderBox=style.boxSizing=='border-box';
for(var i=0; i < measurementsLength; i++){
var measurement=measurements[i];
var value=style[ measurement ];
var num=parseFloat(value);
size[ measurement ] = !isNaN(num) ? num:0;
}
var paddingWidth=size.paddingLeft + size.paddingRight;
var paddingHeight=size.paddingTop + size.paddingBottom;
var marginWidth=size.marginLeft + size.marginRight;
var marginHeight=size.marginTop + size.marginBottom;
var borderWidth=size.borderLeftWidth + size.borderRightWidth;
var borderHeight=size.borderTopWidth + size.borderBottomWidth;
var isBorderBoxSizeOuter=isBorderBox&&isBoxSizeOuter;
var styleWidth=getStyleSize(style.width);
if(styleWidth!==false){
size.width=styleWidth +
(isBorderBoxSizeOuter ? 0:paddingWidth + borderWidth);
}
var styleHeight=getStyleSize(style.height);
if(styleHeight!==false){
size.height=styleHeight +
(isBorderBoxSizeOuter ? 0:paddingHeight + borderHeight);
}
size.innerWidth=size.width -(paddingWidth + borderWidth);
size.innerHeight=size.height -(paddingHeight + borderHeight);
size.outerWidth=size.width + marginWidth;
size.outerHeight=size.height + marginHeight;
return size;
}
return getSize;
});
(function(window, factory){
'use strict';
if(typeof define=='function'&&define.amd){
define('desandro-matches-selector/matches-selector',factory);
}else if(typeof module=='object'&&module.exports){
module.exports=factory();
}else{
window.matchesSelector=factory();
}}(window, function factory(){
'use strict';
var matchesMethod=(function(){
var ElemProto=window.Element.prototype;
if(ElemProto.matches){
return 'matches';
}
if(ElemProto.matchesSelector){
return 'matchesSelector';
}
var prefixes=[ 'webkit', 'moz', 'ms', 'o' ];
for(var i=0; i < prefixes.length; i++){
var prefix=prefixes[i];
var method=prefix + 'MatchesSelector';
if(ElemProto[ method ]){
return method;
}}
})();
return function matchesSelector(elem, selector){
return elem[ matchesMethod ](selector);
};}));
(function(window, factory){
if(typeof define=='function'&&define.amd){
define('fizzy-ui-utils/utils',[
'desandro-matches-selector/matches-selector'
], function(matchesSelector){
return factory(window, matchesSelector);
});
}else if(typeof module=='object'&&module.exports){
module.exports=factory(
window,
require('desandro-matches-selector')
);
}else{
window.fizzyUIUtils=factory(
window,
window.matchesSelector
);
}}(window, function factory(window, matchesSelector){
var utils={};
utils.extend=function(a, b){
for(var prop in b){
a[ prop ]=b[ prop ];
}
return a;
};
utils.modulo=function(num, div){
return(( num % div) + div) % div;
};
utils.makeArray=function(obj){
var ary=[];
if(Array.isArray(obj)){
ary=obj;
}else if(obj&&typeof obj=='object' &&
typeof obj.length=='number'){
for(var i=0; i < obj.length; i++){
ary.push(obj[i]);
}}else{
ary.push(obj);
}
return ary;
};
utils.removeFrom=function(ary, obj){
var index=ary.indexOf(obj);
if(index!=-1){
ary.splice(index, 1);
}};
utils.getParent=function(elem, selector){
while(elem!=document.body){
elem=elem.parentNode;
if(matchesSelector(elem, selector)){
return elem;
}}
};
utils.getQueryElement=function(elem){
if(typeof elem=='string'){
return document.querySelector(elem);
}
return elem;
};
utils.handleEvent=function(event){
var method='on' + event.type;
if(this[ method ]){
this[ method ](event);
}};
utils.filterFindElements=function(elems, selector){
elems=utils.makeArray(elems);
var ffElems=[];
elems.forEach(function(elem){
if(!(elem instanceof HTMLElement)){
return;
}
if(!selector){
ffElems.push(elem);
return;
}
if(matchesSelector(elem, selector)){
ffElems.push(elem);
}
var childElems=elem.querySelectorAll(selector);
for(var i=0; i < childElems.length; i++){
ffElems.push(childElems[i]);
}});
return ffElems;
};
utils.debounceMethod=function(_class, methodName, threshold){
var method=_class.prototype[ methodName ];
var timeoutName=methodName + 'Timeout';
_class.prototype[ methodName ]=function(){
var timeout=this[ timeoutName ];
if(timeout){
clearTimeout(timeout);
}
var args=arguments;
var _this=this;
this[ timeoutName ]=setTimeout(function(){
method.apply(_this, args);
delete _this[ timeoutName ];
}, threshold||100);
};};
utils.docReady=function(callback){
var readyState=document.readyState;
if(readyState=='complete'||readyState=='interactive'){
setTimeout(callback);
}else{
document.addEventListener('DOMContentLoaded', callback);
}};
utils.toDashed=function(str){
return str.replace(/(.)([A-Z])/g, function(match, $1, $2){
return $1 + '-' + $2;
}).toLowerCase();
};
var console=window.console;
utils.htmlInit=function(WidgetClass, namespace){
utils.docReady(function(){
var dashedNamespace=utils.toDashed(namespace);
var dataAttr='data-' + dashedNamespace;
var dataAttrElems=document.querySelectorAll('[' + dataAttr + ']');
var jsDashElems=document.querySelectorAll('.js-' + dashedNamespace);
var elems=utils.makeArray(dataAttrElems)
.concat(utils.makeArray(jsDashElems));
var dataOptionsAttr=dataAttr + '-options';
var jQuery=window.jQuery;
elems.forEach(function(elem){
var attr=elem.getAttribute(dataAttr) ||
elem.getAttribute(dataOptionsAttr);
var options;
try {
options=attr&&JSON.parse(attr);
} catch(error){
if(console){
console.error('Error parsing ' + dataAttr + ' on ' + elem.className +
': ' + error);
}
return;
}
var instance=new WidgetClass(elem, options);
if(jQuery){
jQuery.data(elem, namespace, instance);
}});
});
};
return utils;
}));
(function(window, factory){
if(typeof define=='function'&&define.amd){
define('outlayer/item',[
'ev-emitter/ev-emitter',
'get-size/get-size'
],
factory
);
}else if(typeof module=='object'&&module.exports){
module.exports=factory(
require('ev-emitter'),
require('get-size')
);
}else{
window.Outlayer={};
window.Outlayer.Item=factory(
window.EvEmitter,
window.getSize
);
}}(window, function factory(EvEmitter, getSize){
'use strict';
function isEmptyObj(obj){
for(var prop in obj){
return false;
}
prop=null;
return true;
}
var docElemStyle=document.documentElement.style;
var transitionProperty=typeof docElemStyle.transition=='string' ?
'transition':'WebkitTransition';
var transformProperty=typeof docElemStyle.transform=='string' ?
'transform':'WebkitTransform';
var transitionEndEvent={
WebkitTransition: 'webkitTransitionEnd',
transition: 'transitionend'
}[ transitionProperty ];
var vendorProperties={
transform: transformProperty,
transition: transitionProperty,
transitionDuration: transitionProperty + 'Duration',
transitionProperty: transitionProperty + 'Property',
transitionDelay: transitionProperty + 'Delay'
};
function Item(element, layout){
if(!element){
return;
}
this.element=element;
this.layout=layout;
this.position={
x: 0,
y: 0
};
this._create();
}
var proto=Item.prototype=Object.create(EvEmitter.prototype);
proto.constructor=Item;
proto._create=function(){
this._transn={
ingProperties: {},
clean: {},
onEnd: {}};
this.css({
position: 'absolute'
});
};
proto.handleEvent=function(event){
var method='on' + event.type;
if(this[ method ]){
this[ method ](event);
}};
proto.getSize=function(){
this.size=getSize(this.element);
};
proto.css=function(style){
var elemStyle=this.element.style;
for(var prop in style){
var supportedProp=vendorProperties[ prop ]||prop;
elemStyle[ supportedProp ]=style[ prop ];
}};
proto.getPosition=function(){
var style=getComputedStyle(this.element);
var isOriginLeft=this.layout._getOption('originLeft');
var isOriginTop=this.layout._getOption('originTop');
var xValue=style[ isOriginLeft ? 'left':'right' ];
var yValue=style[ isOriginTop ? 'top':'bottom' ];
var layoutSize=this.layout.size;
var x=xValue.indexOf('%')!=-1 ?
(parseFloat(xValue) / 100) * layoutSize.width:parseInt(xValue, 10);
var y=yValue.indexOf('%')!=-1 ?
(parseFloat(yValue) / 100) * layoutSize.height:parseInt(yValue, 10);
x=isNaN(x) ? 0:x;
y=isNaN(y) ? 0:y;
x -=isOriginLeft ? layoutSize.paddingLeft:layoutSize.paddingRight;
y -=isOriginTop ? layoutSize.paddingTop:layoutSize.paddingBottom;
this.position.x=x;
this.position.y=y;
};
proto.layoutPosition=function(){
var layoutSize=this.layout.size;
var style={};
var isOriginLeft=this.layout._getOption('originLeft');
var isOriginTop=this.layout._getOption('originTop');
var xPadding=isOriginLeft ? 'paddingLeft':'paddingRight';
var xProperty=isOriginLeft ? 'left':'right';
var xResetProperty=isOriginLeft ? 'right':'left';
var x=this.position.x + layoutSize[ xPadding ];
style[ xProperty ]=this.getXValue(x);
style[ xResetProperty ]='';
var yPadding=isOriginTop ? 'paddingTop':'paddingBottom';
var yProperty=isOriginTop ? 'top':'bottom';
var yResetProperty=isOriginTop ? 'bottom':'top';
var y=this.position.y + layoutSize[ yPadding ];
style[ yProperty ]=this.getYValue(y);
style[ yResetProperty ]='';
this.css(style);
this.emitEvent('layout', [ this ]);
};
proto.getXValue=function(x){
var isHorizontal=this.layout._getOption('horizontal');
return this.layout.options.percentPosition&&!isHorizontal ?
(( x / this.layout.size.width) * 100) + '%':x + 'px';
};
proto.getYValue=function(y){
var isHorizontal=this.layout._getOption('horizontal');
return this.layout.options.percentPosition&&isHorizontal ?
(( y / this.layout.size.height) * 100) + '%':y + 'px';
};
proto._transitionTo=function(x, y){
this.getPosition();
var curX=this.position.x;
var curY=this.position.y;
var compareX=parseInt(x, 10);
var compareY=parseInt(y, 10);
var didNotMove=compareX===this.position.x&&compareY===this.position.y;
this.setPosition(x, y);
if(didNotMove&&!this.isTransitioning){
this.layoutPosition();
return;
}
var transX=x - curX;
var transY=y - curY;
var transitionStyle={};
transitionStyle.transform=this.getTranslate(transX, transY);
this.transition({
to: transitionStyle,
onTransitionEnd: {
transform: this.layoutPosition
},
isCleaning: true
});
};
proto.getTranslate=function(x, y){
var isOriginLeft=this.layout._getOption('originLeft');
var isOriginTop=this.layout._getOption('originTop');
x=isOriginLeft ? x:-x;
y=isOriginTop ? y:-y;
return 'translate3d(' + x + 'px, ' + y + 'px, 0)';
};
proto.goTo=function(x, y){
this.setPosition(x, y);
this.layoutPosition();
};
proto.moveTo=proto._transitionTo;
proto.setPosition=function(x, y){
this.position.x=parseInt(x, 10);
this.position.y=parseInt(y, 10);
};
proto._nonTransition=function(args){
this.css(args.to);
if(args.isCleaning){
this._removeStyles(args.to);
}
for(var prop in args.onTransitionEnd){
args.onTransitionEnd[ prop ].call(this);
}};
proto.transition=function(args){
if(!parseFloat(this.layout.options.transitionDuration)){
this._nonTransition(args);
return;
}
var _transition=this._transn;
for(var prop in args.onTransitionEnd){
_transition.onEnd[ prop ]=args.onTransitionEnd[ prop ];
}
for(prop in args.to){
_transition.ingProperties[ prop ]=true;
if(args.isCleaning){
_transition.clean[ prop ]=true;
}}
if(args.from){
this.css(args.from);
var h=this.element.offsetHeight;
h=null;
}
this.enableTransition(args.to);
this.css(args.to);
this.isTransitioning=true;
};
function toDashedAll(str){
return str.replace(/([A-Z])/g, function($1){
return '-' + $1.toLowerCase();
});
}
var transitionProps='opacity,' + toDashedAll(transformProperty);
proto.enableTransition=function(){
if(this.isTransitioning){
return;
}
var duration=this.layout.options.transitionDuration;
duration=typeof duration=='number' ? duration + 'ms':duration;
this.css({
transitionProperty: transitionProps,
transitionDuration: duration,
transitionDelay: this.staggerDelay||0
});
this.element.addEventListener(transitionEndEvent, this, false);
};
proto.onwebkitTransitionEnd=function(event){
this.ontransitionend(event);
};
proto.onotransitionend=function(event){
this.ontransitionend(event);
};
var dashedVendorProperties={
'-webkit-transform': 'transform'
};
proto.ontransitionend=function(event){
if(event.target!==this.element){
return;
}
var _transition=this._transn;
var propertyName=dashedVendorProperties[ event.propertyName ]||event.propertyName;
delete _transition.ingProperties[ propertyName ];
if(isEmptyObj(_transition.ingProperties)){
this.disableTransition();
}
if(propertyName in _transition.clean){
this.element.style[ event.propertyName ]='';
delete _transition.clean[ propertyName ];
}
if(propertyName in _transition.onEnd){
var onTransitionEnd=_transition.onEnd[ propertyName ];
onTransitionEnd.call(this);
delete _transition.onEnd[ propertyName ];
}
this.emitEvent('transitionEnd', [ this ]);
};
proto.disableTransition=function(){
this.removeTransitionStyles();
this.element.removeEventListener(transitionEndEvent, this, false);
this.isTransitioning=false;
};
proto._removeStyles=function(style){
var cleanStyle={};
for(var prop in style){
cleanStyle[ prop ]='';
}
this.css(cleanStyle);
};
var cleanTransitionStyle={
transitionProperty: '',
transitionDuration: '',
transitionDelay: ''
};
proto.removeTransitionStyles=function(){
this.css(cleanTransitionStyle);
};
proto.stagger=function(delay){
delay=isNaN(delay) ? 0:delay;
this.staggerDelay=delay + 'ms';
};
proto.removeElem=function(){
this.element.parentNode.removeChild(this.element);
this.css({ display: '' });
this.emitEvent('remove', [ this ]);
};
proto.remove=function(){
if(!transitionProperty||!parseFloat(this.layout.options.transitionDuration)){
this.removeElem();
return;
}
this.once('transitionEnd', function(){
this.removeElem();
});
this.hide();
};
proto.reveal=function(){
delete this.isHidden;
this.css({ display: '' });
var options=this.layout.options;
var onTransitionEnd={};
var transitionEndProperty=this.getHideRevealTransitionEndProperty('visibleStyle');
onTransitionEnd[ transitionEndProperty ]=this.onRevealTransitionEnd;
this.transition({
from: options.hiddenStyle,
to: options.visibleStyle,
isCleaning: true,
onTransitionEnd: onTransitionEnd
});
};
proto.onRevealTransitionEnd=function(){
if(!this.isHidden){
this.emitEvent('reveal');
}};
proto.getHideRevealTransitionEndProperty=function(styleProperty){
var optionStyle=this.layout.options[ styleProperty ];
if(optionStyle.opacity){
return 'opacity';
}
for(var prop in optionStyle){
return prop;
}};
proto.hide=function(){
this.isHidden=true;
this.css({ display: '' });
var options=this.layout.options;
var onTransitionEnd={};
var transitionEndProperty=this.getHideRevealTransitionEndProperty('hiddenStyle');
onTransitionEnd[ transitionEndProperty ]=this.onHideTransitionEnd;
this.transition({
from: options.visibleStyle,
to: options.hiddenStyle,
isCleaning: true,
onTransitionEnd: onTransitionEnd
});
};
proto.onHideTransitionEnd=function(){
if(this.isHidden){
this.css({ display: 'none' });
this.emitEvent('hide');
}};
proto.destroy=function(){
this.css({
position: '',
left: '',
right: '',
top: '',
bottom: '',
transition: '',
transform: ''
});
};
return Item;
}));
(function(window, factory){
'use strict';
if(typeof define=='function'&&define.amd){
define('outlayer/outlayer',[
'ev-emitter/ev-emitter',
'get-size/get-size',
'fizzy-ui-utils/utils',
'./item'
],
function(EvEmitter, getSize, utils, Item){
return factory(window, EvEmitter, getSize, utils, Item);
}
);
}else if(typeof module=='object'&&module.exports){
module.exports=factory(
window,
require('ev-emitter'),
require('get-size'),
require('fizzy-ui-utils'),
require('./item')
);
}else{
window.Outlayer=factory(
window,
window.EvEmitter,
window.getSize,
window.fizzyUIUtils,
window.Outlayer.Item
);
}}(window, function factory(window, EvEmitter, getSize, utils, Item){
'use strict';
var console=window.console;
var jQuery=window.jQuery;
var noop=function(){};
var GUID=0;
var instances={};
function Outlayer(element, options){
var queryElement=utils.getQueryElement(element);
if(!queryElement){
if(console){
console.error('Bad element for ' + this.constructor.namespace +
': ' +(queryElement||element));
}
return;
}
this.element=queryElement;
if(jQuery){
this.$element=jQuery(this.element);
}
this.options=utils.extend({}, this.constructor.defaults);
this.option(options);
var id=++GUID;
this.element.outlayerGUID=id;
instances[ id ]=this;
this._create();
var isInitLayout=this._getOption('initLayout');
if(isInitLayout){
this.layout();
}}
Outlayer.namespace='outlayer';
Outlayer.Item=Item;
Outlayer.defaults={
containerStyle: {
position: 'relative'
},
initLayout: true,
originLeft: true,
originTop: true,
resize: true,
resizeContainer: true,
transitionDuration: '0.4s',
hiddenStyle: {
opacity: 0,
transform: 'scale(0.001)'
},
visibleStyle: {
opacity: 1,
transform: 'scale(1)'
}};
var proto=Outlayer.prototype;
utils.extend(proto, EvEmitter.prototype);
proto.option=function(opts){
utils.extend(this.options, opts);
};
proto._getOption=function(option){
var oldOption=this.constructor.compatOptions[ option ];
return oldOption&&this.options[ oldOption ]!==undefined ?
this.options[ oldOption ]:this.options[ option ];
};
Outlayer.compatOptions={
initLayout: 'isInitLayout',
horizontal: 'isHorizontal',
layoutInstant: 'isLayoutInstant',
originLeft: 'isOriginLeft',
originTop: 'isOriginTop',
resize: 'isResizeBound',
resizeContainer: 'isResizingContainer'
};
proto._create=function(){
this.reloadItems();
this.stamps=[];
this.stamp(this.options.stamp);
utils.extend(this.element.style, this.options.containerStyle);
var canBindResize=this._getOption('resize');
if(canBindResize){
this.bindResize();
}};
proto.reloadItems=function(){
this.items=this._itemize(this.element.children);
};
proto._itemize=function(elems){
var itemElems=this._filterFindItemElements(elems);
var Item=this.constructor.Item;
var items=[];
for(var i=0; i < itemElems.length; i++){
var elem=itemElems[i];
var item=new Item(elem, this);
items.push(item);
}
return items;
};
proto._filterFindItemElements=function(elems){
return utils.filterFindElements(elems, this.options.itemSelector);
};
proto.getItemElements=function(){
return this.items.map(function(item){
return item.element;
});
};
proto.layout=function(){
this._resetLayout();
this._manageStamps();
var layoutInstant=this._getOption('layoutInstant');
var isInstant=layoutInstant!==undefined ?
layoutInstant:!this._isLayoutInited;
this.layoutItems(this.items, isInstant);
this._isLayoutInited=true;
};
proto._init=proto.layout;
proto._resetLayout=function(){
this.getSize();
};
proto.getSize=function(){
this.size=getSize(this.element);
};
proto._getMeasurement=function(measurement, size){
var option=this.options[ measurement ];
var elem;
if(!option){
this[ measurement ]=0;
}else{
if(typeof option=='string'){
elem=this.element.querySelector(option);
}else if(option instanceof HTMLElement){
elem=option;
}
this[ measurement ]=elem ? getSize(elem)[ size ]:option;
}};
proto.layoutItems=function(items, isInstant){
items=this._getItemsForLayout(items);
this._layoutItems(items, isInstant);
this._postLayout();
};
proto._getItemsForLayout=function(items){
return items.filter(function(item){
return !item.isIgnored;
});
};
proto._layoutItems=function(items, isInstant){
this._emitCompleteOnItems('layout', items);
if(!items||!items.length){
return;
}
var queue=[];
items.forEach(function(item){
var position=this._getItemLayoutPosition(item);
position.item=item;
position.isInstant=isInstant||item.isLayoutInstant;
queue.push(position);
}, this);
this._processLayoutQueue(queue);
};
proto._getItemLayoutPosition=function(){
return {
x: 0,
y: 0
};};
proto._processLayoutQueue=function(queue){
this.updateStagger();
queue.forEach(function(obj, i){
this._positionItem(obj.item, obj.x, obj.y, obj.isInstant, i);
}, this);
};
proto.updateStagger=function(){
var stagger=this.options.stagger;
if(stagger===null||stagger===undefined){
this.stagger=0;
return;
}
this.stagger=getMilliseconds(stagger);
return this.stagger;
};
proto._positionItem=function(item, x, y, isInstant, i){
if(isInstant){
item.goTo(x, y);
}else{
item.stagger(i * this.stagger);
item.moveTo(x, y);
}};
proto._postLayout=function(){
this.resizeContainer();
};
proto.resizeContainer=function(){
var isResizingContainer=this._getOption('resizeContainer');
if(!isResizingContainer){
return;
}
var size=this._getContainerSize();
if(size){
this._setContainerMeasure(size.width, true);
this._setContainerMeasure(size.height, false);
}};
proto._getContainerSize=noop;
proto._setContainerMeasure=function(measure, isWidth){
if(measure===undefined){
return;
}
var elemSize=this.size;
if(elemSize.isBorderBox){
measure +=isWidth ? elemSize.paddingLeft + elemSize.paddingRight +
elemSize.borderLeftWidth + elemSize.borderRightWidth :
elemSize.paddingBottom + elemSize.paddingTop +
elemSize.borderTopWidth + elemSize.borderBottomWidth;
}
measure=Math.max(measure, 0);
this.element.style[ isWidth ? 'width':'height' ]=measure + 'px';
};
proto._emitCompleteOnItems=function(eventName, items){
var _this=this;
function onComplete(){
_this.dispatchEvent(eventName + 'Complete', null, [ items ]);
}
var count=items.length;
if(!items||!count){
onComplete();
return;
}
var doneCount=0;
function tick(){
doneCount++;
if(doneCount==count){
onComplete();
}}
items.forEach(function(item){
item.once(eventName, tick);
});
};
proto.dispatchEvent=function(type, event, args){
var emitArgs=event ? [ event ].concat(args):args;
this.emitEvent(type, emitArgs);
if(jQuery){
this.$element=this.$element||jQuery(this.element);
if(event){
var $event=jQuery.Event(event);
$event.type=type;
this.$element.trigger($event, args);
}else{
this.$element.trigger(type, args);
}}
};
proto.ignore=function(elem){
var item=this.getItem(elem);
if(item){
item.isIgnored=true;
}};
proto.unignore=function(elem){
var item=this.getItem(elem);
if(item){
delete item.isIgnored;
}};
proto.stamp=function(elems){
elems=this._find(elems);
if(!elems){
return;
}
this.stamps=this.stamps.concat(elems);
elems.forEach(this.ignore, this);
};
proto.unstamp=function(elems){
elems=this._find(elems);
if(!elems){
return;
}
elems.forEach(function(elem){
utils.removeFrom(this.stamps, elem);
this.unignore(elem);
}, this);
};
proto._find=function(elems){
if(!elems){
return;
}
if(typeof elems=='string'){
elems=this.element.querySelectorAll(elems);
}
elems=utils.makeArray(elems);
return elems;
};
proto._manageStamps=function(){
if(!this.stamps||!this.stamps.length){
return;
}
this._getBoundingRect();
this.stamps.forEach(this._manageStamp, this);
};
proto._getBoundingRect=function(){
var boundingRect=this.element.getBoundingClientRect();
var size=this.size;
this._boundingRect={
left: boundingRect.left + size.paddingLeft + size.borderLeftWidth,
top: boundingRect.top + size.paddingTop + size.borderTopWidth,
right: boundingRect.right -(size.paddingRight + size.borderRightWidth),
bottom: boundingRect.bottom -(size.paddingBottom + size.borderBottomWidth)
};};
proto._manageStamp=noop;
proto._getElementOffset=function(elem){
var boundingRect=elem.getBoundingClientRect();
var thisRect=this._boundingRect;
var size=getSize(elem);
var offset={
left: boundingRect.left - thisRect.left - size.marginLeft,
top: boundingRect.top - thisRect.top - size.marginTop,
right: thisRect.right - boundingRect.right - size.marginRight,
bottom: thisRect.bottom - boundingRect.bottom - size.marginBottom
};
return offset;
};
proto.handleEvent=utils.handleEvent;
proto.bindResize=function(){
window.addEventListener('resize', this);
this.isResizeBound=true;
};
proto.unbindResize=function(){
window.removeEventListener('resize', this);
this.isResizeBound=false;
};
proto.onresize=function(){
this.resize();
};
utils.debounceMethod(Outlayer, 'onresize', 100);
proto.resize=function(){
if(!this.isResizeBound||!this.needsResizeLayout()){
return;
}
this.layout();
};
proto.needsResizeLayout=function(){
var size=getSize(this.element);
var hasSizes=this.size&&size;
return hasSizes&&size.innerWidth!==this.size.innerWidth;
};
proto.addItems=function(elems){
var items=this._itemize(elems);
if(items.length){
this.items=this.items.concat(items);
}
return items;
};
proto.appended=function(elems){
var items=this.addItems(elems);
if(!items.length){
return;
}
this.layoutItems(items, true);
this.reveal(items);
};
proto.prepended=function(elems){
var items=this._itemize(elems);
if(!items.length){
return;
}
var previousItems=this.items.slice(0);
this.items=items.concat(previousItems);
this._resetLayout();
this._manageStamps();
this.layoutItems(items, true);
this.reveal(items);
this.layoutItems(previousItems);
};
proto.reveal=function(items){
this._emitCompleteOnItems('reveal', items);
if(!items||!items.length){
return;
}
var stagger=this.updateStagger();
items.forEach(function(item, i){
item.stagger(i * stagger);
item.reveal();
});
};
proto.hide=function(items){
this._emitCompleteOnItems('hide', items);
if(!items||!items.length){
return;
}
var stagger=this.updateStagger();
items.forEach(function(item, i){
item.stagger(i * stagger);
item.hide();
});
};
proto.revealItemElements=function(elems){
var items=this.getItems(elems);
this.reveal(items);
};
proto.hideItemElements=function(elems){
var items=this.getItems(elems);
this.hide(items);
};
proto.getItem=function(elem){
for(var i=0; i < this.items.length; i++){
var item=this.items[i];
if(item.element==elem){
return item;
}}
};
proto.getItems=function(elems){
elems=utils.makeArray(elems);
var items=[];
elems.forEach(function(elem){
var item=this.getItem(elem);
if(item){
items.push(item);
}}, this);
return items;
};
proto.remove=function(elems){
var removeItems=this.getItems(elems);
this._emitCompleteOnItems('remove', removeItems);
if(!removeItems||!removeItems.length){
return;
}
removeItems.forEach(function(item){
item.remove();
utils.removeFrom(this.items, item);
}, this);
};
proto.destroy=function(){
var style=this.element.style;
style.height='';
style.position='';
style.width='';
this.items.forEach(function(item){
item.destroy();
});
this.unbindResize();
var id=this.element.outlayerGUID;
delete instances[ id ];
delete this.element.outlayerGUID;
if(jQuery){
jQuery.removeData(this.element, this.constructor.namespace);
}};
Outlayer.data=function(elem){
elem=utils.getQueryElement(elem);
var id=elem&&elem.outlayerGUID;
return id&&instances[ id ];
};
Outlayer.create=function(namespace, options){
var Layout=subclass(Outlayer);
Layout.defaults=utils.extend({}, Outlayer.defaults);
utils.extend(Layout.defaults, options);
Layout.compatOptions=utils.extend({}, Outlayer.compatOptions);
Layout.namespace=namespace;
Layout.data=Outlayer.data;
Layout.Item=subclass(Item);
utils.htmlInit(Layout, namespace);
if(jQuery&&jQuery.bridget){
jQuery.bridget(namespace, Layout);
}
return Layout;
};
function subclass(Parent){
function SubClass(){
Parent.apply(this, arguments);
}
SubClass.prototype=Object.create(Parent.prototype);
SubClass.prototype.constructor=SubClass;
return SubClass;
}
var msUnits={
ms: 1,
s: 1000
};
function getMilliseconds(time){
if(typeof time=='number'){
return time;
}
var matches=time.match(/(^\d*\.?\d*)(\w*)/);
var num=matches&&matches[1];
var unit=matches&&matches[2];
if(!num.length){
return 0;
}
num=parseFloat(num);
var mult=msUnits[ unit ]||1;
return num * mult;
}
Outlayer.Item=Item;
return Outlayer;
}));
(function(window, factory){
if(typeof define=='function'&&define.amd){
define([
'outlayer/outlayer',
'get-size/get-size'
],
factory);
}else if(typeof module=='object'&&module.exports){
module.exports=factory(
require('outlayer'),
require('get-size')
);
}else{
window.Masonry=factory(
window.Outlayer,
window.getSize
);
}}(window, function factory(Outlayer, getSize){
var Masonry=Outlayer.create('masonry');
Masonry.compatOptions.fitWidth='isFitWidth';
var proto=Masonry.prototype;
proto._resetLayout=function(){
this.getSize();
this._getMeasurement('columnWidth', 'outerWidth');
this._getMeasurement('gutter', 'outerWidth');
this.measureColumns();
this.colYs=[];
for(var i=0; i < this.cols; i++){
this.colYs.push(0);
}
this.maxY=0;
this.horizontalColIndex=0;
};
proto.measureColumns=function(){
this.getContainerWidth();
if(!this.columnWidth){
var firstItem=this.items[0];
var firstItemElem=firstItem&&firstItem.element;
this.columnWidth=firstItemElem&&getSize(firstItemElem).outerWidth ||
this.containerWidth;
}
var columnWidth=this.columnWidth +=this.gutter;
var containerWidth=this.containerWidth + this.gutter;
var cols=containerWidth / columnWidth;
var excess=columnWidth - containerWidth % columnWidth;
var mathMethod=excess&&excess < 1 ? 'round':'floor';
cols=Math[ mathMethod ](cols);
this.cols=Math.max(cols, 1);
};
proto.getContainerWidth=function(){
var isFitWidth=this._getOption('fitWidth');
var container=isFitWidth ? this.element.parentNode:this.element;
var size=getSize(container);
this.containerWidth=size&&size.innerWidth;
};
proto._getItemLayoutPosition=function(item){
item.getSize();
var remainder=item.size.outerWidth % this.columnWidth;
var mathMethod=remainder&&remainder < 1 ? 'round':'ceil';
var colSpan=Math[ mathMethod ](item.size.outerWidth / this.columnWidth);
colSpan=Math.min(colSpan, this.cols);
var colPosMethod=this.options.horizontalOrder ?
'_getHorizontalColPosition':'_getTopColPosition';
var colPosition=this[ colPosMethod ](colSpan, item);
var position={
x: this.columnWidth * colPosition.col,
y: colPosition.y
};
var setHeight=colPosition.y + item.size.outerHeight;
var setMax=colSpan + colPosition.col;
for(var i=colPosition.col; i < setMax; i++){
this.colYs[i]=setHeight;
}
return position;
};
proto._getTopColPosition=function(colSpan){
var colGroup=this._getTopColGroup(colSpan);
var minimumY=Math.min.apply(Math, colGroup);
return {
col: colGroup.indexOf(minimumY),
y: minimumY,
};};
proto._getTopColGroup=function(colSpan){
if(colSpan < 2){
return this.colYs;
}
var colGroup=[];
var groupCount=this.cols + 1 - colSpan;
for(var i=0; i < groupCount; i++){
colGroup[i]=this._getColGroupY(i, colSpan);
}
return colGroup;
};
proto._getColGroupY=function(col, colSpan){
if(colSpan < 2){
return this.colYs[ col ];
}
var groupColYs=this.colYs.slice(col, col + colSpan);
return Math.max.apply(Math, groupColYs);
};
proto._getHorizontalColPosition=function(colSpan, item){
var col=this.horizontalColIndex % this.cols;
var isOver=colSpan > 1&&col + colSpan > this.cols;
col=isOver ? 0:col;
var hasSize=item.size.outerWidth&&item.size.outerHeight;
this.horizontalColIndex=hasSize ? col + colSpan:this.horizontalColIndex;
return {
col: col,
y: this._getColGroupY(col, colSpan),
};};
proto._manageStamp=function(stamp){
var stampSize=getSize(stamp);
var offset=this._getElementOffset(stamp);
var isOriginLeft=this._getOption('originLeft');
var firstX=isOriginLeft ? offset.left:offset.right;
var lastX=firstX + stampSize.outerWidth;
var firstCol=Math.floor(firstX / this.columnWidth);
firstCol=Math.max(0, firstCol);
var lastCol=Math.floor(lastX / this.columnWidth);
lastCol -=lastX % this.columnWidth ? 0:1;
lastCol=Math.min(this.cols - 1, lastCol);
var isOriginTop=this._getOption('originTop');
var stampMaxY=(isOriginTop ? offset.top:offset.bottom) +
stampSize.outerHeight;
for(var i=firstCol; i <=lastCol; i++){
this.colYs[i]=Math.max(stampMaxY, this.colYs[i]);
}};
proto._getContainerSize=function(){
this.maxY=Math.max.apply(Math, this.colYs);
var size={
height: this.maxY
};
if(this._getOption('fitWidth')){
size.width=this._getContainerFitWidth();
}
return size;
};
proto._getContainerFitWidth=function(){
var unusedCols=0;
var i=this.cols;
while(--i){
if(this.colYs[i]!==0){
break;
}
unusedCols++;
}
return(this.cols - unusedCols) * this.columnWidth - this.gutter;
};
proto.needsResizeLayout=function(){
var previousWidth=this.containerWidth;
this.getContainerWidth();
return previousWidth!=this.containerWidth;
};
return Masonry;
}));
jQuery(document).ready(function ($){
String.prototype.replaceAll=function (find, replace){
var str=this;
return str.replace(new RegExp(find.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&'), 'g'), replace);
};
$.fn.ignore=function (sel){
return this.clone().find(sel).remove().end();
};
function get_mail_from_website(){
var regEx=/[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\.[a-zA-Z0-9-.]+/g;
var email=new Array();
var elements=["footer", ".main_content"];
for (var i=0; i < elements.length; i++){
var temp=new Array();
$(elements[i]).filter(function (){
email=$(this).ignore("input,a").html().match(regEx);
$(email).each(function (index, val){
var flag=true;
$(temp).each(function (indexT, val){
if(temp[indexT]==email[index])
flag=false;
});
if(flag){
var arr=val.split('@');
$(elements[i]).html($(elements[i]).html().replaceAll(val, "
" + val + ""));
temp.push(email[index]);
}});
});
}}
get_mail_from_website();
function data_click(){
$('.inner-item').on('click', function (e){
var url=$(this).attr('data-click');
if(url!=null){
window.location.href=url;
}});
}
data_click();
function fixed_header(){
var header=$('.main_header_wrapper');
$(window).scroll(function (){
if($(this).scrollTop() > 70){
header.addClass("shadow");
}else{
header.removeClass("shadow");
}});
var h=header.outerHeight();
header.addClass("fixed-menu");
$('.banner-wrapper').css('margin-top',h);
if($('.page-home').length > 0){
$('#primary').css('margin-top',h);
}}
function select_change(){
$('.list-mobile select').change(function (){
var val=$(this).val();
window.location.href=val;
})
}
select_change();
function config_gallery_masonry(){
$('.gallery-inner').masonry({
itemSelector: '.item-image',
columnWidth: '.item-image',
percentPosition: true,
gutter: 15
});
$('.gallery-inner').magnificPopup({
delegate: 'a',
type: 'image',
closeOnContentClick: false,
closeBtnInside: false,
mainClass: 'mfp-with-zoom mfp-img-mobile',
image: {
verticalFit: true
},
gallery: {
enabled: true
},
zoom: {
enabled: true,
duration: 300,
opener: function (element){
return element.find('img');
}}
});
}
function Fix_height(){
var max_diensten=0;
$('.diensten-list .diensten-section').each(function (e){
var h=$(this).find('.conversion-title').outerHeight();
if(h > max_diensten){
max_diensten=h;
}});
$('.diensten-list .diensten-section .content-wrap').height(max_diensten);
var max_rea=0;
$('.realisaties-list .realisaties-section').each(function (e){
var h_1=$(this).find('.conversion-title').outerHeight();
if(h_1 > max_rea){
max_rea=h_1;
}});
$('.realisaties-list .realisaties-section .content-wrap').height(max_rea);
var h_input_field=$('.main_content .gform_wrapper form .gform_body .ginput_container input').outerHeight();
$('.main_content .gform_wrapper form .gform_body .ginput_container textarea').height(h_input_field * 2 - 4);
var h_main_content=$('.main_content .inner-content').outerHeight();
var h_sidebar=$('.main_content .sidebar').outerHeight();
if(h_main_content < h_sidebar){
$('.main_content .inner-content').height(h_sidebar + 50);
}}
function check_menu_mobile(){
if($(window).width() <=961){
$(".btn-menu-responsive.btn_menu").fadeIn();
$('.menu-wrapper-inner').addClass('menu-mobile');
}else{
$(".btn-menu-responsive.btn_menu").fadeOut();
$('.menu-wrapper-inner').removeClass('menu-mobile');
}
$(".btn-menu-responsive.btn_menu").on('click', function (e){
$('.menu-mobile').css("left", "0");
$(this).hide();
$(".btn_close").fadeIn();
});
$(".btn_close").on('click', function (e){
$('.menu-mobile').css("left", "-100%");
$(this).hide();
$(".btn-menu-responsive.btn_menu").fadeIn();
});
}
check_menu_mobile();
$(window).load(function (){
config_gallery_masonry();
Fix_height();
if($(window).width() > 959){
fixed_header();
}
});
var timer;
$(window).resize(function (){
if(timer){
window.clearTimeout(timer);
}
timer=window.setTimeout(function (){
Fix_height();
check_menu_mobile();
}, 500);
});
function backgroundParallax(selector, scrollRatio){
$(selector).addClass("background-parallax");
$(".background-parallax").each(function (){
var scroll=$(window).scrollTop() * scrollRatio;
var img=$(this).children("img");
img.css({"top": -1 * scroll + "px"});
while (img.width() < $(window).width()){
img.css({"height": img.height() * 1.001 + "px"});
}});
}
$(window).on("load resize scroll", function (){
backgroundParallax(".banner-wrapper .banner", 0.3);
});
});
function mailto(address){
document.location.href='mail' + 'to:' + address;
};
!function(a,b){"use strict";function c(){if(!e){e=!0;var a,c,d,f,g=-1!==navigator.appVersion.indexOf("MSIE 10"),h=!!navigator.userAgent.match(/Trident.*rv:11\./),i=b.querySelectorAll("iframe.wp-embedded-content");for(c=0;c
1e3)g=1e3;else if(~~g<200)g=200;f.height=g}if("link"===d.message)if(h=b.createElement("a"),i=b.createElement("a"),h.href=f.getAttribute("src"),i.href=d.value,i.host===h.host)if(b.activeElement===f)a.top.location.href=d.value}else;}},d)a.addEventListener("message",a.wp.receiveEmbedMessage,!1),b.addEventListener("DOMContentLoaded",c,!1),a.addEventListener("load",c,!1)}(window,document);
function vc_js(){vc_toggleBehaviour(),vc_tabsBehaviour(),vc_accordionBehaviour(),vc_teaserGrid(),vc_carouselBehaviour(),vc_slidersBehaviour(),vc_prettyPhoto(),vc_googleplus(),vc_pinterest(),vc_progress_bar(),vc_plugin_flexslider(),vc_google_fonts(),vc_gridBehaviour(),vc_rowBehaviour(),vc_prepareHoverBox(),vc_googleMapsPointer(),vc_ttaActivation(),jQuery(document).trigger("vc_js"),window.setTimeout(vc_waypoints,500)}function getSizeName(){var screen_w=jQuery(window).width();return 1170screen_w?"desktop":768screen_w?"tablet":300screen_w?"mobile":300>screen_w?"mobile_portrait":""}function loadScript(url,$obj,callback){var script=document.createElement("script");script.type="text/javascript",script.readyState&&(script.onreadystatechange=function(){"loaded"!==script.readyState&&"complete"!==script.readyState||(script.onreadystatechange=null,callback())}),script.src=url,$obj.get(0).appendChild(script)}function vc_ttaActivation(){jQuery("[data-vc-accordion]").on("show.vc.accordion",function(e){var $=window.jQuery,ui={};ui.newPanel=$(this).data("vc.accordion").getTarget(),window.wpb_prepare_tab_content(e,ui)})}function vc_accordionActivate(event,ui){if(ui.newPanel.length&&ui.newHeader.length){var $pie_charts=ui.newPanel.find(".vc_pie_chart:not(.vc_ready)"),$round_charts=ui.newPanel.find(".vc_round-chart"),$line_charts=ui.newPanel.find(".vc_line-chart"),$carousel=ui.newPanel.find('[data-ride="vc_carousel"]');void 0!==jQuery.fn.isotope&&ui.newPanel.find(".isotope, .wpb_image_grid_ul").isotope("layout"),ui.newPanel.find(".vc_masonry_media_grid, .vc_masonry_grid").length&&ui.newPanel.find(".vc_masonry_media_grid, .vc_masonry_grid").each(function(){var grid=jQuery(this).data("vcGrid");grid&&grid.gridBuilder&&grid.gridBuilder.setMasonry&&grid.gridBuilder.setMasonry()}),vc_carouselBehaviour(ui.newPanel),vc_plugin_flexslider(ui.newPanel),$pie_charts.length&&jQuery.fn.vcChat&&$pie_charts.vcChat(),$round_charts.length&&jQuery.fn.vcRoundChart&&$round_charts.vcRoundChart({reload:!1}),$line_charts.length&&jQuery.fn.vcLineChart&&$line_charts.vcLineChart({reload:!1}),$carousel.length&&jQuery.fn.carousel&&$carousel.carousel("resizeAction"),ui.newPanel.parents(".isotope").length&&ui.newPanel.parents(".isotope").each(function(){jQuery(this).isotope("layout")})}}function initVideoBackgrounds(){return window.console&&window.console.warn&&window.console.warn("this function is deprecated use vc_initVideoBackgrounds"),vc_initVideoBackgrounds()}function vc_initVideoBackgrounds(){jQuery("[data-vc-video-bg]").each(function(){var youtubeUrl,youtubeId,$element=jQuery(this);$element.data("vcVideoBg")?(youtubeUrl=$element.data("vcVideoBg"),youtubeId=vcExtractYoutubeId(youtubeUrl),youtubeId&&($element.find(".vc_video-bg").remove(),insertYoutubeVideoAsBackground($element,youtubeId)),jQuery(window).on("grid:items:added",function(event,$grid){$element.has($grid).length&&vcResizeVideoBackground($element)})):$element.find(".vc_video-bg").remove()})}function insertYoutubeVideoAsBackground($element,youtubeId,counter){if("undefined"==typeof YT||void 0===YT.Player)return 100<(counter=void 0===counter?0:counter)?void console.warn("Too many attempts to load YouTube api"):void setTimeout(function(){insertYoutubeVideoAsBackground($element,youtubeId,counter++)},100);var $container=$element.prepend('').find(".inner");new YT.Player($container[0],{width:"100%",height:"100%",videoId:youtubeId,playerVars:{playlist:youtubeId,iv_load_policy:3,enablejsapi:1,disablekb:1,autoplay:1,controls:0,showinfo:0,rel:0,loop:1,wmode:"transparent"},events:{onReady:function(event){event.target.mute().setLoop(!0)}}}),vcResizeVideoBackground($element),jQuery(window).bind("resize",function(){vcResizeVideoBackground($element)})}function vcResizeVideoBackground($element){var iframeW,iframeH,marginLeft,marginTop,containerW=$element.innerWidth(),containerH=$element.innerHeight();containerW/containerH<16/9?(iframeW=containerH*(16/9),iframeH=containerH,marginLeft=-Math.round((iframeW-containerW)/2)+"px",marginTop=-Math.round((iframeH-containerH)/2)+"px",iframeW+="px",iframeH+="px"):(iframeW=containerW,iframeH=containerW*(9/16),marginTop=-Math.round((iframeH-containerH)/2)+"px",marginLeft=-Math.round((iframeW-containerW)/2)+"px",iframeW+="px",iframeH+="px"),$element.find(".vc_video-bg iframe").css({maxWidth:"1000%",marginLeft:marginLeft,marginTop:marginTop,width:iframeW,height:iframeH})}function vcExtractYoutubeId(url){if(void 0===url)return!1;var id=url.match(/(?:https?:\/{2})?(?:w{3}\.)?youtu(?:be)?\.(?:com|be)(?:\/watch\?v=|\/)([^\s&]+)/);return null!==id&&id[1]}function vc_googleMapsPointer(){var $=window.jQuery,$wpbGmapsWidget=$(".wpb_gmaps_widget");$wpbGmapsWidget.click(function(){$("iframe",this).css("pointer-events","auto")}),$wpbGmapsWidget.mouseleave(function(){$("iframe",this).css("pointer-events","none")}),$(".wpb_gmaps_widget iframe").css("pointer-events","none")}function vc_setHoverBoxPerspective(hoverBox){hoverBox.each(function(){var $this=jQuery(this),width=$this.width(),perspective=4*width+"px";$this.css("perspective",perspective)})}function vc_setHoverBoxHeight(hoverBox){hoverBox.each(function(){var $this=jQuery(this),hoverBoxInner=$this.find(".vc-hoverbox-inner");hoverBoxInner.css("min-height",0);var frontHeight=$this.find(".vc-hoverbox-front-inner").outerHeight(),backHeight=$this.find(".vc-hoverbox-back-inner").outerHeight(),hoverBoxHeight=frontHeight>backHeight?frontHeight:backHeight;hoverBoxHeight<250&&(hoverBoxHeight=250),hoverBoxInner.css("min-height",hoverBoxHeight+"px")})}function vc_prepareHoverBox(){var hoverBox=jQuery(".vc-hoverbox");vc_setHoverBoxHeight(hoverBox),vc_setHoverBoxPerspective(hoverBox)}document.documentElement.className+=" js_active ",document.documentElement.className+="ontouchstart"in document.documentElement?" vc_mobile ":" vc_desktop ",function(){for(var prefix=["-webkit-","-moz-","-ms-","-o-",""],i=0;iparseInt(ver[1]);$call.each(function(index){var $tabs,interval=jQuery(this).attr("data-interval"),tabs_array=[];if($tabs=jQuery(this).find(".wpb_tour_tabs_wrapper").tabs({show:function(event,ui){wpb_prepare_tab_content(event,ui)},beforeActivate:function(event,ui){1!==ui.newPanel.index()&&ui.newPanel.find(".vc_pie_chart:not(.vc_ready)")},activate:function(event,ui){wpb_prepare_tab_content(event,ui)}}),interval&&0index?index=$tabs.tabs("length")-1:index>=$tabs.tabs("length")&&(index=0),$tabs.tabs("select",index)}else{var index=$tabs.tabs("option","active"),length=$tabs.find(".wpb_tab").length;index=jQuery(this).parent().hasClass("wpb_next_slide")?index+1>=length?0:index+1:0>index-1?length-1:index-1,$tabs.tabs("option","active",index)}})})}}),"function"!=typeof window.vc_accordionBehaviour&&(window.vc_accordionBehaviour=function(){jQuery(".wpb_accordion").each(function(index){var $tabs,$this=jQuery(this),active_tab=($this.attr("data-interval"),!isNaN(jQuery(this).data("active-tab"))&&0 div > h3",autoHeight:!1,heightStyle:"content",active:active_tab,collapsible:collapsible,navigation:!0,activate:vc_accordionActivate,change:function(event,ui){void 0!==jQuery.fn.isotope&&ui.newContent.find(".isotope").isotope("layout"),vc_carouselBehaviour(ui.newPanel)}}),!0===$this.data("vcDisableKeydown")&&($tabs.data("uiAccordion")._keydown=function(){})})}),"function"!=typeof window.vc_teaserGrid&&(window.vc_teaserGrid=function(){var layout_modes={fitrows:"fitRows",masonry:"masonry"};jQuery(".wpb_grid .teaser_grid_container:not(.wpb_carousel), .wpb_filtered_grid .teaser_grid_container:not(.wpb_carousel)").each(function(){var $container=jQuery(this),$thumbs=$container.find(".wpb_thumbnails"),layout_mode=$thumbs.attr("data-layout-mode");$thumbs.isotope({itemSelector:".isotope-item",layoutMode:void 0===layout_modes[layout_mode]?"fitRows":layout_modes[layout_mode]}),$container.find(".categories_filter a").data("isotope",$thumbs).click(function(e){e.preventDefault();var $thumbs=jQuery(this).data("isotope");jQuery(this).parent().parent().find(".active").removeClass("active"),jQuery(this).parent().addClass("active"),$thumbs.isotope({filter:jQuery(this).attr("data-filter")})}),jQuery(window).bind("load resize",function(){$thumbs.isotope("layout")})})}),"function"!=typeof window.vc_carouselBehaviour&&(window.vc_carouselBehaviour=function($parent){($parent?$parent.find(".wpb_carousel"):jQuery(".wpb_carousel")).each(function(){var $this=jQuery(this);if(!0!==$this.data("carousel_enabled")&&$this.is(":visible")){$this.data("carousel_enabled",!0),getColumnsCount(jQuery(this)),jQuery(this).hasClass("columns_count_1");var carousele_li=jQuery(this).find(".wpb_thumbnails-fluid li");carousele_li.css({"margin-right":carousele_li.css("margin-left"),"margin-left":0});var fluid_ul=jQuery(this).find("ul.wpb_thumbnails-fluid");fluid_ul.width(fluid_ul.width()+300),jQuery(window).resize(function(){var before_resize=screen_size;screen_size=getSizeName(),before_resize!=screen_size&&window.setTimeout("location.reload()",20)})}})}),"function"!=typeof window.vc_slidersBehaviour&&(window.vc_slidersBehaviour=function(){jQuery(".wpb_gallery_slides").each(function(index){var $imagesGrid,this_element=jQuery(this);if(this_element.hasClass("wpb_slider_nivo")){var sliderTimeout=1e3*this_element.attr("data-interval");0===sliderTimeout&&(sliderTimeout=9999999999),this_element.find(".nivoSlider").nivoSlider({effect:"boxRainGrow,boxRain,boxRainReverse,boxRainGrowReverse",slices:15,boxCols:8,boxRows:4,animSpeed:800,pauseTime:sliderTimeout,startSlide:0,directionNav:!0,directionNavHide:!0,controlNav:!0,keyboardNav:!1,pauseOnHover:!0,manualAdvance:!1,prevText:"Prev",nextText:"Next"})}else this_element.hasClass("wpb_image_grid")&&(jQuery.fn.imagesLoaded?$imagesGrid=this_element.find(".wpb_image_grid_ul").imagesLoaded(function(){$imagesGrid.isotope({itemSelector:".isotope-item",layoutMode:"fitRows"})}):this_element.find(".wpb_image_grid_ul").isotope({itemSelector:".isotope-item",layoutMode:"fitRows"}))})}),"function"!=typeof window.vc_prettyPhoto&&(window.vc_prettyPhoto=function(){try{jQuery&&jQuery.fn&&jQuery.fn.prettyPhoto&&jQuery('a.prettyphoto, .gallery-icon a[href*=".jpg"]').prettyPhoto({animationSpeed:"normal",hook:"data-rel",padding:15,opacity:.7,showTitle:!0,allowresize:!0,counter_separator_label:"/",hideflash:!1,deeplinking:!1,modal:!1,callback:function(){location.href.indexOf("#!prettyPhoto")>-1&&(location.hash="")},social_tools:""})}catch(err){window.console&&window.console.log&&console.log(err)}}),"function"!=typeof window.vc_google_fonts&&(window.vc_google_fonts=function(){return!1}),window.vcParallaxSkroll=!1,"function"!=typeof window.vc_rowBehaviour&&(window.vc_rowBehaviour=function(){function fullWidthRow(){var $elements=$('[data-vc-full-width="true"]');$.each($elements,function(key,item){var $el=$(this);$el.addClass("vc_hidden");var $el_full=$el.next(".vc_row-full-width");if($el_full.length||($el_full=$el.parent().next(".vc_row-full-width")),$el_full.length){var el_margin_left=parseInt($el.css("margin-left"),10),el_margin_right=parseInt($el.css("margin-right"),10),offset=0-$el_full.offset().left-el_margin_left,width=$(window).width();if($el.css({position:"relative",left:offset,"box-sizing":"border-box",width:$(window).width()}),!$el.data("vcStretchContent")){var padding=-1*offset;0>padding&&(padding=0);var paddingRight=width-padding-$el_full.width()+el_margin_left+el_margin_right;0>paddingRight&&(paddingRight=0),$el.css({"padding-left":padding+"px","padding-right":paddingRight+"px"})}$el.attr("data-vc-full-width-init","true"),$el.removeClass("vc_hidden"),$(document).trigger("vc-full-width-row-single",{el:$el,offset:offset,marginLeft:el_margin_left,marginRight:el_margin_right,elFull:$el_full,width:width})}}),$(document).trigger("vc-full-width-row",$elements)}function fullHeightRow(){var $element=$(".vc_row-o-full-height:first");if($element.length){var $window,windowHeight,offsetTop,fullHeight;$window=$(window),windowHeight=$window.height(),offsetTop=$element.offset().top,offsetTop0||navigator.userAgent.match(/Trident.*rv\:11\./))&&$(".vc_row-o-full-height").each(function(){"flex"===$(this).css("display")&&$(this).wrap('')})}(),vc_initVideoBackgrounds(),function(){var vcSkrollrOptions,callSkrollInit=!1;window.vcParallaxSkroll&&window.vcParallaxSkroll.destroy(),$(".vc_parallax-inner").remove(),$("[data-5p-top-bottom]").removeAttr("data-5p-top-bottom data-30p-top-bottom"),$("[data-vc-parallax]").each(function(){var skrollrSpeed,skrollrSize,skrollrStart,skrollrEnd,$parallaxElement,parallaxImage,youtubeId;callSkrollInit=!0,"on"===$(this).data("vcParallaxOFade")&&$(this).children().attr("data-5p-top-bottom","opacity:0;").attr("data-30p-top-bottom","opacity:1;"),skrollrSize=100*$(this).data("vcParallax"),$parallaxElement=$("").addClass("vc_parallax-inner").appendTo($(this)),$parallaxElement.height(skrollrSize+"%"),parallaxImage=$(this).data("vcParallaxImage"),youtubeId=vcExtractYoutubeId(parallaxImage),youtubeId?insertYoutubeVideoAsBackground($parallaxElement,youtubeId):void 0!==parallaxImage&&$parallaxElement.css("background-image","url("+parallaxImage+")"),skrollrSpeed=skrollrSize-100,skrollrStart=-skrollrSpeed,skrollrEnd=0,$parallaxElement.attr("data-bottom-top","top: "+skrollrStart+"%;").attr("data-top-bottom","top: "+skrollrEnd+"%;")}),!(!callSkrollInit||!window.skrollr)&&(vcSkrollrOptions={forceHeight:!1,smoothScrolling:!1,mobileCheck:function(){return!1}},window.vcParallaxSkroll=skrollr.init(vcSkrollrOptions),window.vcParallaxSkroll)}()}),"function"!=typeof window.vc_gridBehaviour&&(window.vc_gridBehaviour=function(){jQuery.fn.vcGrid&&jQuery("[data-vc-grid]").vcGrid()}),"function"!=typeof window.getColumnsCount&&(window.getColumnsCount=function(el){for(var find=!1,i=1;!1===find;){if(el.hasClass("columns_count_"+i))return find=!0,i;i++}});var screen_size=getSizeName();"function"!=typeof window.wpb_prepare_tab_content&&(window.wpb_prepare_tab_content=function(event,ui){var $ui_panel,$google_maps,panel=ui.panel||ui.newPanel,$pie_charts=panel.find(".vc_pie_chart:not(.vc_ready)"),$round_charts=panel.find(".vc_round-chart"),$line_charts=panel.find(".vc_line-chart"),$carousel=panel.find('[data-ride="vc_carousel"]');if(vc_carouselBehaviour(),vc_plugin_flexslider(panel),ui.newPanel.find(".vc_masonry_media_grid, .vc_masonry_grid").length&&ui.newPanel.find(".vc_masonry_media_grid, .vc_masonry_grid").each(function(){var grid=jQuery(this).data("vcGrid");grid&&grid.gridBuilder&&grid.gridBuilder.setMasonry&&grid.gridBuilder.setMasonry()}),panel.find(".vc_masonry_media_grid, .vc_masonry_grid").length&&panel.find(".vc_masonry_media_grid, .vc_masonry_grid").each(function(){var grid=jQuery(this).data("vcGrid");grid&&grid.gridBuilder&&grid.gridBuilder.setMasonry&&grid.gridBuilder.setMasonry()}),$pie_charts.length&&jQuery.fn.vcChat&&$pie_charts.vcChat(),$round_charts.length&&jQuery.fn.vcRoundChart&&$round_charts.vcRoundChart({reload:!1}),$line_charts.length&&jQuery.fn.vcLineChart&&$line_charts.vcLineChart({reload:!1}),$carousel.length&&jQuery.fn.carousel&&$carousel.carousel("resizeAction"),$ui_panel=panel.find(".isotope, .wpb_image_grid_ul"),$google_maps=panel.find(".wpb_gmaps_widget"),0<$ui_panel.length&&$ui_panel.isotope("layout"),$google_maps.length&&!$google_maps.is(".map_ready")){var $frame=$google_maps.find("iframe");$frame.attr("src",$frame.attr("src")),$google_maps.addClass("map_ready")}panel.parents(".isotope").length&&panel.parents(".isotope").each(function(){jQuery(this).isotope("layout")})}),window.vc_googleMapsPointer,jQuery(document).ready(vc_prepareHoverBox),jQuery(window).resize(vc_prepareHoverBox),jQuery(document).ready(function($){window.vc_js()});